With an interior magnet motor (interior permanent magnet (IPM) motor) in which permanent magnets are embedded in a rotor, a structure where openings are provided at the ends of the permanent magnets to suppress demagnetization is known (see, for example, Patent Literature 1 mentioned below).